home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / prog / cfuncs.zip / IDLECHAR.C < prev    next >
Text File  |  1991-07-08  |  820b  |  28 lines

  1. #include <conio.h>
  2. #include <funcs.h>
  3.  
  4. void (*idle_func)(void) = ShowClock;
  5. /*-------------------- Get Idle Char ---------------------------*/
  6. /*                                                              */
  7. /* Description: Runs a functions until a key is pressed.        */
  8. /*                                                              */
  9. /* Input: A void function that takes nothing as input.          */
  10. /*                                                              */
  11. /* Output: The key pressed.                                     */
  12. /*                                                              */
  13. /*--------------------------------------------------------------*/
  14.  
  15.  
  16. char GetIdleCh ( void )
  17. {
  18.  
  19.   while (!kbhit() )
  20.     idle_func();
  21.  
  22.   return(getch());
  23.  
  24. }
  25.  
  26. void nothing(void)
  27. {
  28. };